<?php

namespace app\common\lib\Ai;

use app\common\lib\Ai\model\QwenOpenApi;
use app\common\lib\Ai\model\ZhiZengZengOpenApi;
use support\Log;

/**
 * @method void chat($content, $aiCommand = '')
 */
class OpenApi
{
    const BIND_CLASS = [
        0 => ZhiZengZengOpenApi::class,
        1 => QwenOpenApi::class
    ];

    public static function getInstance() {

        $aiOpen = config('param.ai_open', 0);
        $model = self::BIND_CLASS[$aiOpen] ?? ZhiZengZengOpenApi::class;
        return new $model;
    }
}